#pragma once

#include <string>

namespace nio {

	enum class ChannelStatus
	{
		idle, connecting, connected
	};

	class ClientChannel;
	class ServerChannel;
	class SocketError;

	class ChannelDelegate {
	public:
		virtual void onConnect(ClientChannel* channel, std::string host, int port) = 0;
		virtual void onDisconnect(ClientChannel* channel, SocketError* error) = 0;
		virtual void onRead(ClientChannel* channel, std::string& data) = 0;
		virtual void onAccept(ClientChannel* channel) {}
		virtual void onError(SocketError* error) {}
	};
}